package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Museum;
import es.ats.codington.festival.domain.Place.Zone;



public class MuseumMapper implements RowMapper<Museum>{

	@Override
	public Museum mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Museum museum = new Museum();
		

		museum.setIdPlace(resultSet.getInt("idPlace"));
		museum.setPlaceName(resultSet.getString("placeName"));
		museum.setZone(Zone.NORTH);
		museum.setCapacity(resultSet.getInt("capacity"));
		museum.setMuseumName(resultSet.getString("museumName"));
			
			
		return museum;
	}

}
